
export function insituredirect(that, url) {
  // 原页面切换,不打开新页面
  return that.$router.push({
    path: url
  })
}

export function newdirect(that, path, query) {
  // 打开新页面  query是非必填的
  const { href } = that.$router.resolve({
    path: path,
    query: query
  })
  window.open(href, '_blank')
}

export function winclose() {
  // 关闭页面
  return window.close()
}
